<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title></title>
</head>
<body>
	
</body>
<script type="text/javascript">
	var n= 10;
	var sum = 0;
	for(var i=1;i<=n;i++){
       var tmp = 1;
       for(var j=i;j>=1;j--){
       	 tmp=tmp*j;
       }
       sum=sum+tmp;
	}
	console.log(sum)
</script>
</html>